package com.bawei.shopping2.viewmodel

import androidx.lifecycle.ViewModel
import com.bawei.shopping2.entity.BannerEntity
import com.bawei.shopping2.entity.CategoryEntity
import com.bawei.shopping2.entity.GoodsEntity
import com.bawei.shopping2.entity.UserEntity
import com.bawei.shopping2.http.ApiResponse
import com.bawei.shopping2.repository.DetailRepository
import com.bawei.shopping2.repository.LoginRepository
import com.bawei.shopping2.repository.MainRepository
import dagger.hilt.android.lifecycle.HiltViewModel
import okhttp3.RequestBody
import javax.inject.Inject

//注意：依赖注入到viewModel
@HiltViewModel
class LoginViewModel @Inject constructor(private var loginRepository: LoginRepository ):ViewModel() {
    suspend fun login( requestBody: RequestBody):ApiResponse<UserEntity>{
        return loginRepository.login(requestBody)
    }
}